/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tpdisenio2009.model.beans;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author DeuterioX
 */
@Entity
@Table(name = "journalist")
@NamedQueries({
    @NamedQuery(name = "Journalist.findAll", query = "SELECT j FROM Journalist j")})
public class Journalist extends Person implements Serializable {
    private static final long serialVersionUID = 1L;

    public Journalist() {
    }

    public Journalist(Integer id) {
        super(id);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (getId() != null ? getId().hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Journalist)) {
            return false;
        }
        Journalist other = (Journalist) object;
        if ((getId() == null && other.getId() != null) || (getId() != null && !getId().equals(other.getId()))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "tpdisenio2009.model.beans.Journalist[id=" + getId() + "]";
    }

}
